/* model */
import { BaseSelectUserFormField } from '@src/component/common/BaseSelectUser/components/Form/model'
/* vue */
import { computed } from 'vue'

import { t } from '@src/locales'

function useBaseSelectUserFormField(props: { field: BaseSelectUserFormField }) {
  
  const label = computed(() => {
    return props.field.label || ''
  })
  
  const placeholder = computed(() => {
    return props.field.placeholder || `${t('common.placeholder.input2')}${label.value}`
  })
  
  const placeholderForSelect = computed(() => {
    return props.field.placeholder || t('common.placeholder.select')
  })
  
  return {
    label,
    placeholder,
    placeholderForSelect
  }
  
}

export {
  useBaseSelectUserFormField
}
